package com.okaixz.client.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * APP用户信息表
 * </p>
 *
 * @author cdz
 * @since 2024-10-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@ApiModel(value="User对象", description="APP用户信息表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String wxOpenid;
    private String nanoid;

    @ApiModelProperty(value = "扫码登录才有")
    private String wxRefreshToken;

    @ApiModelProperty(value = "微信扫码登录才有")
    private String wxAccessToken;

    @ApiModelProperty(value = "小程序登录才有")
    private String wxSessionKey;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "用户名")
    private String nickName;

    @ApiModelProperty(value = "密码,md5加密")
    private String password;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "头像")
    private String image;
    @ApiModelProperty(value = "客户端名称")
    private String clientName;

    @ApiModelProperty(value = "0 男1 女2 未知")
    private Integer sex;

    @ApiModelProperty(value = "0正常1锁定")
    private Integer status;

    @ApiModelProperty(value = "0正常1vip会员")
    private Integer vipFlag;

    @ApiModelProperty(value = "剩余次数")
    private Integer remainTimes;
    @ApiModelProperty(value = "其它信息")
    private Integer flag;//对于密码键盘：第1位为是否开启云端同步

    @ApiModelProperty(value = "不限字数结束时间")
    private LocalDateTime vipExpireTime1;

    @ApiModelProperty(value = "vip过期时间")
    private LocalDateTime vipExpireTime;

    @ApiModelProperty(value = "注册时间")
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "用户类型0pc1小程序")
    private Integer type;
    @ApiModelProperty(value = "剩余字数")
    private Integer vipTokens;
    @ApiModelProperty(value = "是否关注微信公众号0未关注 1关注")
    private Integer subscribe;
    @ApiModelProperty(value = "签到标志")
    private Integer qiandao;

    //其它信息userId+vipFlag+"###"+vipExpireTime1加密串
    @TableField(exist = false)//不映射数据库字段
    private String otherInfo;


}
